<? include ("../init.php") ?>
<? include ("../header.php") ?>
<? include ("../menu.php") ?>
<? include ("submenu.php") ?>

<div id = "body">

<h1>+<?_l('user')?></h1>
<div class = "clear"></div>

<form method="post" action="add.php" class = "form">
  <div class = "field"><label><?_l('username')?></label><input type = "text" name = "username" class = "input size1"></div>
  <div class = "field"><label><?_l('password')?></label><input type = "text" name = "password" class = "input size1"></div>
  <div class = "field"><label><?_l('name')?></label><input type = "text" name = "name" class = "input size1"></div>
  
  
  <div class = "field">
    <label><?_l('gender')?></label>
    <input type= "radio" name = "gender" value="M" >Male
    <input type= "radio" name = "gender" value="F" >Female
  </div>
  <div class = "field"><label><?_l('birthday')?></label>
    
    <select name="day">
      <?php
    	for ($i = 1;$i <= 31;$i++){
    		echo "<option value=".$i.">$i</option>";	
    	}
      ?>
    </select>
    
    <select name="month" >
      <?php
        for($i = 1;$i <= 12;$i++){
      	 echo "<option value=".$i.">".get_month_name($i, $short = 1)."</option>";
        }
      ?>
    </select>
    
    <select name="year">
      <?php
    	for ($i = 1911;$i <= 2011;$i++){
    		echo "<option value=".$i.">$i</option>";	
    	}
      ?>
    </select>
  </div>
  <div class = "field"><label><?_l('job')?></label>
    <select name="job">
      <?php
  		$rss = $db->query("SELECT * FROM job");
  		while ($line = $db->fetchNextObject($rss)){
  		echo "<option value= '".$line->jid."'>".$line->jobname."</option>\n";
  		}
	  ?>
    </select>
  </div>
  <div class = "field"><label><?_l('address')?></label><textarea name="address"></textarea></div>
  <div class = "field"><label><?_l('province')?></label>
    <select name = "province">
      <?
        $rss = $db->query("SELECT * FROM province");
        while ($line = $db->fetchNextObject($rss)){
          echo "<option value = '".$line->proid."'>".$line->province."</option>\n";
        }
      ?>
    </select>
  </div>
  <div class = "field"><label><?_l('country')?></label><input type = "text" name = "country" class = "input size1"></div>
  <div class = "field"><label><?_l('zipcode')?></label><input type = "text" name = "zipcode" class = "input size1"></div>
  <div class = "field"><label><?_l('groupuser')?></label><input type = "text" name = "groupuser" class = "input size1"></div>
  <div class = "field"><label></label>
    <input type="submit" name="save" value="Submit" class = "btn" />
    <input onclick = "javascript:history.back(1)" type = "button" value="Cancel" class = "btn" />
  </div>
</form>

</div>

<style>
  .form label {
    width:120px;
  }
</style>

<? include ("../footer.php") ?>